About 992 letters

About 5 minutes

#HTML <canvas>

Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.

#Attributes

  • height: The height of the coordinate space in CSS pixels. Defaults to 150.
  • moz-opaque Non-standard

Deprecated : Lets the canvas know whether translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized canvas.getContext('2d', { alpha: false }) instead.

  • width: The width of the coordinate space in CSS pixels. Defaults to 300.

Created in 6/9/2025

Updated in 6/9/2025